package qc.module.iot.protocol;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Iot数据帧正文内容数据项类型
 *
 * @author QuCheng Tech
 * @since 2025/11/13
 */
@Getter
@AllArgsConstructor
public enum IotFrameBodyDataItemTypeEnum {
    UN_DEFINE(0, "未定义"),
    STATION_ADDRESS(1, "遥测站地址"),
    STATION_CATEGORY(2, "遥测站分类"),
    TIME(10, "数据时标"),//数据时标、观测时间
    TIME_SEND(11, "发报时间"),//发报时间、发送时间
    VALUE(20, "数据值"),
    STATUS(30, "状态");

    @EnumValue
    private int index;
    private String name;

    @Override
    public String toString() {
        if (this != null)
            return this.name;

        return null;
    }
}
